<template>
	<view class="my-container">
		<view style="visibility: hidden;">margin</view>
		<view class="box" v-if="qianming">
			<my-qianming></my-qianming>
		</view>
		<view class="box" v-else>
			<view class="image1">
				<image src="@/static/image/car1.jpg"></image>
			</view>
			<uni-table border stripe emptyText="请进行签名并提交" >
				<!--   <uni-tr>
			        <uni-th align="center" width="300rpx">日期</uni-th>
			        <uni-th align="center" width="300rpx">姓名</uni-th>
			    </uni-tr> -->
				<!-- 表格数据行 -->
				<uni-tr>
					<uni-td>姓名</uni-td>
					<uni-td>徐涵1</uni-td>
				</uni-tr>
				<uni-tr>
					<uni-td>地点</uni-td>
					<uni-td>上海市</uni-td>
				</uni-tr>
				<uni-tr>
					<uni-td>时间</uni-td>
					<uni-td>2021-10-4</uni-td>
				</uni-tr>
				<uni-tr>
					<uni-td>详情</uni-td>
					<uni-td>暂无详情</uni-td>
				</uni-tr>
			</uni-table>

		</view>
		<view>
	
			<button type="primary" class="button1" @click="button1();tijiao();">提交按钮</button>
			<button type="primary" class="button2" @click="qian();button2()">负责人签名</button>
		</view>
	</view>
</template>

<script>
	import {mapState} from 'vuex'
	import{mapMutations} from 'vuex'
	export default {
		data() {
			return {
				showQianming:false
			}
		},
		computed:{
			...mapState('m_qianming',['qianming']),
		},
		methods: {
			...mapMutations('m_qianming',['qian','tijiao']),
			button1() {
				uni.$showMsg('提交成功')
				setTimeout( function(){
				uni.switchTab({
					url:'/pages/check/check'
				})
				}, 5 * 1000 );//延迟5000毫米
			},
			button2() {
				this.showQianming=true;
			}
		}
	}
</script>

<style lang="scss">
	page,
	.my-container {
		height: 100%;
		background-color: #F4F4F4;
	}

	image {
		width: 600rpx;
		height: 400rpx;
	}

	.box {
		border: 3rpx solid #faca82;
		border-radius: 10rpx;
		margin: 0rpx 20rpx 20rpx 20rpx;
		padding: 40rpx;
		box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.15);
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 84%;
		height: 82%;
		.image1{
			margin-bottom: 40rpx;
		}
	
	}

	.button1 { 
		width: 50%;
		/* float: left; */
		position: absolute;
		bottom: 0rpx;
		left: 0rpx;
	}

	.button2 {
		position: absolute;
		bottom: 0rpx;
		right: 0rpx;
		width: 50%;
	}
</style>
